Cassandra Actions - #1729
Cassandra Actions#1729gonzalotguerrero wants to merge 14 commits into
Conversation
| * enumerated, it is also what [isSupported] answers from, so that the two cannot disagree. | ||
| */ | ||
| private val GENE_BUILDERS: Map<String, (String) -> Gene> = mapOf( | ||
| "ascii" to { name -> StringGene(name) }, |
There was a problem hiding this comment.
replace these strings with constants
| * column becomes "name type" optionally followed by a " PARTITION KEY" and/or " CLUSTERING" marker, | ||
| * and columns are joined with ", ". | ||
| */ | ||
| object CassandraTableSchemaParser { |
There was a problem hiding this comment.
I am a bit confused. What is the expected grammar for this parser?
There was a problem hiding this comment.
Hi JP! Apologies for my super late response. The expected grammar here was the one used in the now modified extractRelevantInfo method from CassandraHandler (which used the now deleted describeTableSchema method. It was an attempt to mimic MongoHandler's method with the same name, but I now changed it so that actual DTOs are used for the table schemas.
| * @return the columns described in [tableSchema], in the same order | ||
| * @throws IllegalArgumentException if any of the described columns is malformed | ||
| */ | ||
| fun parse(tableSchema: String): List<CassandraColumn> { |
There was a problem hiding this comment.
who produces the tableSchema string? What is the expected grammar?
| * Whether the duration is negative, ie the sign shared by the three amounts it is composed of. | ||
| * Explicitly defaulted to false, as [BooleanGene] defaults to true. | ||
| */ | ||
| val negative: BooleanGene = BooleanGene("negative", false) |
There was a problem hiding this comment.
should be isNegative instead of simply negative, right?
- Add proper schema DTOs to use in insertionBuilder - Change attribute name - Replace strings with constants
| } | ||
|
|
||
| public CassandraTableSchemaDto(String keyspaceName, String tableName, List<CassandraColumnDto> columns) { | ||
| this.keyspaceName = keyspaceName; |
There was a problem hiding this comment.
are any of these fields expected to be null? Add Objects.requireNonNull or explicitly state that values can be null
No description provided.